#ifndef ADAPTER_H
#define ADAPTER_H
#include<memory>
#include<cmath>
#include "server.h"
#include"clientInterface.h"
//方钉适配器：该适配器能让客户端将方钉放入圆孔中
class SquarePegAdapter:public RoundPeg{
public:
    explicit SquarePegAdapter(std::shared_ptr<SquarePeg> sp):m_squarePeg(sp){}
    int GetRadius() override{
        return m_squarePeg->GetWidth()*sqrt(2)/2;
    }
private:
    std::shared_ptr<SquarePeg> m_squarePeg;
};
#endif // ADAPTER_H
